package com.ruoyi.mobile.storage;

import com.github.pagehelper.PageHelper;
import com.ruoyi.db.mobile.domain.SysStorage;
import com.ruoyi.db.mobile.domain.query.SysStorageQueryVo;
import com.ruoyi.db.mobile.mapper.SysStorageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class WxStorageService
{
    @Autowired
    private SysStorageMapper sysStorageMapper;

    public void deleteByKey(String key)
    {
    }

    /**
     * 添加一个文件存储
     *
     * @author 严方亚
     * @date 2020-05-14
     * @param storageInfo
     */
    public void add(SysStorage storageInfo)
    {
        storageInfo.setAddTime(LocalDateTime.now());
        storageInfo.setUpdateTime(LocalDateTime.now());
        sysStorageMapper.insertSysStorage(storageInfo);
    }

    /**
     * 根据fileKey查询文件存储
     *
     * @author 严方亚
     * @date 2020-05-14
     * @param key
     */
    public SysStorage findByKey(String key)
    {
        return sysStorageMapper.findByKey(key);
    }

    public int update(SysStorage storageInfo)
    {
        return 0;
    }

    public SysStorage findById(Integer id)
    {
        return null;
    }

    public List<SysStorage> querySelective(String key, String name, Integer page, Integer limit, String sort, String order)
    {
        return null;
    }
}
